Conversation
There was a problem hiding this comment.
Hi and thank you for the PR.
Can we refactor it to track downloads in videoView table (that would be renamed to videoStats or something like that)? You would add a downloads column, and merge your save logic in video-views-stats.ts
We also have to track downloads from federated instances. You can introduce a new Download type and use the same logic as send-view.ts file (you only need to send the Download activity to the origin server, the origin server won't forward it).
|
Hi @Chocobozzz I've addressed the first part:
Could you please have a look at it and send me a feedback? I'll try and address the question of remote instances shortly. |
|
Hi @Chocobozzz I've addressed the federation part by duplicating the view part without being able to test anything. I need your help on the following points:
|
Description
The video views are tracked but downloads are not. This behavior makes the identification of useless videos (the ones that are no longer viewed/downloaded by users) difficult.
This PR introduces video download stats (overall counter and timeseries).
I've made the download stats the more generic I could so it opens a door to refactoring views stats or adding new kinds of stats.
Related issues
Has this been tested?
Screenshots